﻿/*=============================================================================
Navigation bar Implementation
==============================================================================*/
var navbarImpl = function () {
    //-------------------------------------------------------------------------
    // Set Menu Bar
    //-------------------------------------------------------------------------
    var setMenuBar = function (id) {
        $('div #headerMenu').find('a').each(function () {
            $(this).removeClass('menuSelected');
        });

        $('#' + id).addClass('menuSelected');
    }

    return {
        //-------------------------------------------------------------------------
        // Set Home Active
        //-------------------------------------------------------------------------
        setHomeActive: function () {
            setMenuBar('homeNav');
        },
        
        //-------------------------------------------------------------------------
        // Set Task List Active
        //-------------------------------------------------------------------------
        setTaskListActive: function () {
            setMenuBar('tasklistNav');
        },
        
        //-------------------------------------------------------------------------
        // Set Task List Active
        //-------------------------------------------------------------------------
        setTopicsActive: function () {
            setMenuBar('topicsNav');
        },

        //-------------------------------------------------------------------------
        // Set Sketch Active
        //-------------------------------------------------------------------------
        setSketchActive: function () {
            setMenuBar('sketchNav');
        },
        
        //-------------------------------------------------------------------------
        // Set Dashboard Active
        //-------------------------------------------------------------------------
        setDashboardActive: function () {
            setMenuBar('dashboardNav');
        },
        
        //-------------------------------------------------------------------------
        // Set Report Active
        //-------------------------------------------------------------------------
        setReportActive: function () {
            setMenuBar('reportNav');
        }
    }
}